﻿<%@ Page Title="" Language="C#" MasterPageFile="~/YUIAspNet.Master" AutoEventWireup="true" CodeBehind="Minimal.aspx.cs" Inherits="YUIAspNetDemo.ColorPicker.Minimal" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>YUIAsp.Net Controls : LiveDemo : ColorPicker : Minimal</title>
    
    <style type="text/css">
        .colorPickerContainer { border: solid 1px #000000; display:block; clear:both; float:left; width:230px; height:200px}
        .colorPickerAjax .hd {display:none;}
        
        /*hide all controls..*/
        .yui-picker-swatch {display:none}
        .yui-picker-websafe-swatch {display:none}
        .yui-picker-controls{display:none}
        .yui-picker-websafe-swatch2{display:none}
    </style>
    
    <script type="text/javascript">
        function ColorChange(sender, args) {
            if(sender.get_element().id.indexOf("backgroundColor") > -1) // bgcolor change
                $get('demo').style.backgroundColor = "rgb(" + args.newValue.join(",") + ")";
            else // color change
                $get('demo').style.color = "rgb(" + args.newValue.join(",") + ")";
        }
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>Minimal UI</h1>
    
    <div id="demo" style="width:400px;height:50px">
        Choose the color and background color from the color picker below...
    </div>
        
    <table><tr><td>
    Background color: <br /><yui:ColorPicker ID="backgroundColor" ShowWebsafe="false" ShowControls="false" ShowHexSummary="false" ShowRgbControls="false" ShowHexControls="false" ShowHsvControls="false" runat="server" CssClass="colorPickerContainer" Color="White" OnClientChange="ColorChange" />
    </td>
    <td>
    Color:<br /> <yui:ColorPicker ID="color" ShowWebsafe="false" ShowControls="false" ShowHexSummary="false" ShowRgbControls="false" ShowHexControls="false" ShowHsvControls="false" runat="server" CssClass="colorPickerContainer" Color="Black" OnClientChange="ColorChange" />    </td>
    </tr></table>
    
    <b></b>
</asp:Content>
